home *** CD-ROM | disk | FTP | other *** search
- In a message of 17 Jan 96 Kenneth C. Nilsen wrote to All:
-
- UV>>> oldfunc=SetFunction(library,oldFuncOffset,newFuncPtr)
- UV>>> what is oldFuncOffset?
- >> It is the offset in the library that you would jump to (in assembler) to
- >> call the library function. For example, the Open() function in dos.library
- >> has an offset of -30.
-
- KCN> No no, the oldFuncOffset is the actual pointer to the routine code of
- KCN> the old function. This will let you use the old function in your new
- KCN> routine:
-
- KCN> Here is an example. We have already opened intuition.library:
-
- KCN> [...]
-
- KCN> move.l $4.w,a6
-
- KCN> move.l IntuitionBase(pc),a1
- KCN> move.l #_LVOOpenWindowTagList,a0
- KCN> move.l #OpenMywin,d0
- KCN> Call SetFunction
- KCN> move.l d0,OldFunc
- KCN> beq.w Close
-
- Isn't this what I said..? The constant "_LVOOpenWindowTagList" is set as
- -606. So the instruction "move.l #_LVOOpenWindowTagList,a0" puts the value
- -606 in to a0 (just like I said to put -30 in a0 for dos.library/Open()).
-
- What's the difference?
-
- .\dam. [Team AMIGA] //\ ad32@brighton.ac.uk \\/
-
-